package com.qf.commons.domain.student;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * 学生表(Student)表实体类
 *
 * @author makejava
 * @since 2023-09-01 20:51:04
 */
@Data
@Accessors(chain = true)
@Schema(description = "学生实体信息")
public class Student implements Serializable {
    //主键
    @TableId(type = IdType.AUTO)
    @Schema(description = "主键", hidden = true)
    private Integer id;
    //班级Id
    @Schema(description = "班级id", required = true)
    private Integer cid;
    //学生姓名
    @Schema(description = "学生姓名", required = true)
    private String name;
    //年龄
    @Schema(description = "学生年龄", required = false)
    private Integer age;
    //生日
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @Schema(description = "生日", required = false)
    private Date birthday;
}

